import { redirect } from "react-router-dom";
import { deleteContact } from "../contacts";

// 删除联系人
export async function action({ params }) {
    // 测试上下文异常
    // throw new Error("Not implemented");
  await deleteContact(params.contactId);
  return redirect("/");
}